package com.xxxx.server.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.xxxx.server.pojo.Admin;
import com.xxxx.server.pojo.AdminRole;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author zhoubin
 * @since 2020-08-17
 */
public interface AdminRoleMapper extends BaseMapper<AdminRole> {

    // 初始化所有角色
    List<Admin> initAllRoles(String name);

    Integer updateAdmin(Integer id);

    // 通过用户ID查询用户关联数据的数量
    Integer countAdminRoleByAdminId(Integer adminId);

    // 通过用户ID删除用户关联数据
    Integer deleteAdminRoleByAdminId(Integer adminId);

}
